<?php 
$pPageIsPublic = false;
include '../_common.php';
	
$_SESSION["m1"]="content";
$_SESSION["m2"]='category-list';

?>
<?php include("header.php"); ?>
<script type="text/javascript">
$(document).ready(function() {
	$('ul.tree-list').admin_sortable("Category");
	$('#select-all').checkedToggle("ul.tree-list", "Category");
});
</script>
<?php include("sidebar.php"); ?>
<div id="list">
<h2>Neighborhoods</h2>
<form method="post" name="frmFilter" >
<ul id="subnav" style="padding-top:0; padding-bottom: 0; " >
	<li ><label for="select-all" class="first-check" ><input type="checkbox" name="select-all" id="select-all" />Select All</label></li>
	<li ><a href="javascript:void(0);" id="remAll"  >Delete Selecctioned</a></li>
	<li ><?php include("filter.php"); ?></li>
	<li class="noborder" >
		<a class="add" href="category-add.php" > Add a New Neighborhoods </a>
	</li>
</ul>
</form>
<div id="wrap-list">
<?php
	$objCat  = new Category();
	$objCat ->loadItems(null, "#status like '". $chkstatus ."%'");
	if ($items = $objCat ->RowsArray(MYSQL_ASSOC)) {
		echo "<ul class='tree-list' >\n";
		foreach ($items as $item) {
			echo "<li id='recordsArray_". $item['categoryId'] ."' class='". (($item['status'] == 'Draft') ? 'draft' : '') ."' ><label for='". $item['categoryId'] ."'>
				  <input id='". $item['categoryId'] ."' type='checkbox' name='items[]' value='". $item['categoryId'] ."'/> ".$item['title'];
			echo "<span class='nav-item' >";
			echo "<a title='edit category' href='category-add.php?id=".$item['categoryId']."'><img width='16px' height='16px' src='". LBN_ADMIN_IMAGES_ICONS_EDIT ."'/> </a>";
			echo "<a title='remove category' href='javascript:void(0);' id='del'  ><img width='16px' height='16px' src='". LBN_ADMIN_IMAGES_ICONS_DELETE ."'/> </a>";
			echo "</span></label>";
			echo "</li>\n";
		}	
		echo "</ul>";
	}
?>
</div>
</div>
<?php include("footer.php"); ?>